package ui;

import org.newdawn.slick.Graphics;

import util.Rect;
import util.Settings;

/**
 * Custom slider tab class.
 * @author VincentLy
 */
public class CustomSliderTab extends Rect{

	private boolean on;
	
	public CustomSliderTab(float x,float y) {
		super(x,y,Settings.sliderTabX,Settings.sliderTabY,5);
		on = false;
	}
	
	/**
	 * @return true if tab is hovered over
	 * @author VincentLy
	 */
	public boolean on(){return on;}
	
	/**
	 * @param b - if tab is hovered over
	 * @author VincentLy
	 */
	public void setOn(boolean b){on = b;}
	
	/**
	 * Draws the custom slider tab.
	 * @author VincentLy
	 */
	public void draw(Graphics g){
		g.setColor(color());
		g.fill(this);
	}
}